home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7392 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1006 b   |  38 lines

  1. Path: unixg.ubc.ca!news
  2. From: csmecher@unixg.ubc.ca (Alec or Graeme Smecher)
  3. Newsgroups: comp.lang.c++
  4. Subject: Assembler / C++ class not working!
  5. Date: Fri, 23 Feb 1996 01:55:06 GMT
  6. Organization: The University of British Columbia
  7. Message-ID: <4gj6pb$gb3@nntp.ucs.ubc.ca>
  8. Reply-To: csmecher@unixg.ubc.ca
  9. NNTP-Posting-Host: port20.annex4.net.ubc.ca
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12.     I have defined a class and, within it, several unsigned int's and a
  13. few functions. The functions have imbedded assembler in them. If I
  14. don't use assembler, I can access these variables in the function just
  15. fine. If I introduce imbedded assembler, it's as if the variables
  16. aren't there! What is wrong? Here is a condensed version: (Sorry if
  17. there's any typos)
  18.  
  19. class MyClass {
  20.     public:
  21.     unsigned int a;
  22.     void function();
  23.     };
  24. void MyClass::function () {
  25.     asm {
  26.         mov ax,a
  27.           ... Do stuff ...
  28.         }
  29.     }
  30.  
  31. For some reason, this will not compile!!!
  32. Please help!!!
  33.  
  34. Thanks for your time...
  35. Alec Smecher
  36. csmecher@unixg.ubc.ca
  37.  
  38.